<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 CalenderUI();
 link_js(array('jquery.fixedheader','bootstrap-typeahead','jquery.maskedit.min'),'asset/js/');
 ?>
<!--<div class='container'>-->
     <div class="tabbable"> <!-- Only required for left/right tabs -->
	<?=$tab_header;?>
       <div class="tab-content" style=''>
	   <br>
            <div class="tab-pane" id="table1"></div>
            <div class="tab-pane active" id="table2"><?=$this->zetro_auth->allAuth($frm3,'list_karyawan');?><?=$this->zetro_auth->allAuth($list,'list_karyawan');?></div></div>
       </div>
		<input type='hidden' id='row_aktif' value='<?=empty($_GET['ot'])?'n':$_GET['ot'];?>'/>
		<input type='hidden' id='rows' value='<?=base64_decode($this->session->userdata('menus'));?>'/>
    </div>
<!--</div>-->
<?=$modal2;?>
<script language='javascript'>
$(document).ready(function(e) {
	$('#bln').html("<?=$bln;?>").change(function(){_show_data('1');});
	$('#thn').html("<?=$thn;?>").change(function(){_show_data('1');});
	$('#id_lokasi').html("<?=(@$_GET['ot']=='y')?$lok2:'<option value=\'0000\'>Koperasi</option>';?>").change(function(){_show_data('1')})
	$('#c_id_karyawan').click(function(){ _show_data('1');});
	$('#frm4').validationEngine();
	_show_data('')
	$('#pros').click(function(){ _print_prev();})
})
function _show_data(tp)
{
		show_indicator2('txt');
		$.post('getlistabsensi',$('#frm1').serialize()+'&ot='+$('#row_aktif').val(),function(result)
		{
			$('#NewList tbody').html(result);
			(tp=='')?
			$('#NewList').fixedHeader({'width':(screen.availWidth-50),'height':(screen.availHeight-370)}):'';
			$('#txt').html('');
			//_get_total_perbln();
		})
}
function _print_prev()
{
	span_indicator('#txt');	
	$.post('printabsenbulanan',$('#frm1').serialize()+'&ot='+$('#row_aktif').val(),function(result)
	{
		$('#txt').html('');
		$('div#rst').css({'display':'none'});
		$('#prv').attr('src',result);
		$('#PrintPrev .modal-body').css({'width':(screen.availWidth-170),'height':(screen.availHeight-205),'overflow':'auto'});
		$('#PrintPrev')
			.css({'left':'25%','width':(screen.availWidth-150),'height':(screen.availHeight-150)})
			.modal('show');
	})
}
</script>